<?php


namespace app\api\validate;


use think\Validate;

class UserWithdrawValidate extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'withdraw_money' => ['require','gt:0'],
        'name' => ['require'],
        'account' => ['require'],
        'bank' => ['require'],
        'mobile' => ['require'],
//        'memo' => ['require'],
    ];

    /**
     * 提示消息
     */
    protected $message = [];

    /**
     * 验证场景
     */
    protected $scene = [
        'applyWithdraw' => ['withdraw_money','name','account','bank','mobile'],
    ];

    public function __construct(array $rules = [], $message = [], $field = [])
    {
        $this->field = [
            'withdraw_money' => '提现金额',
            'name' => '姓名',
            'account' => '提现账号/卡号',
            'bank' => '开户行',
            'mobile' => '手机号',
        ];
        parent::__construct($rules, $message, $field);
    }
}